<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>注册</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, minimal-ui, shrink-to-fit=no">
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/login.css">
<script type="text/javascript" src="js/zepto_1.1.3.js"></script>
<script type="text/javascript" src="js/common.js"></script>
</head>
<body>
<div class="wrap">
	<header class="g_header">
		<h1 class="tit">欢迎加入</h1>
		<div class="side_opt">
			<span class="icon icon_goBack">返回</span>
		</div>
	</header>
	<section class="g_main">
		<div class="login_box">
			<div class="login_form">
				<ul>
					<li><input type="text" placeholder="请输入手机号码"></li>
					<li class="auth_code"><input type="text" placeholder="请输入验证码"><button class="get_code">获取验证码</button></li>
					<li><input type="password" placeholder="请输入密码"></li>
				</ul>
				<div class="type_sel type_sel_register">
					<h3>请选择您的身份</h3>
					<label><input type="radio" name="type_sel" id="chezhu" class="radio"><span>车主</span></label>
					<label><input type="radio" name="type_sel" id="huozhu" class="radio"><span>货主</span></label>
					<label><input type="radio" name="type_sel" id="wuliugongsi" class="radio"><span>物流公司</span></label>
			 </div>
				<button class="btn_save openwebview" data-url="denglu.html">注册</button>
			</div>
		</div>
	</section>
</div>

<script type="text/javascript">
$(function(){
	$(".radio").change(function (){ //拨通
		Storage.set('type_sel',$(this).attr("id"))
	});
	var type_sel = Storage.get('type_sel')||"huozhu";
	console.log($('#'+type_sel)[0].checked);
	if($('#'+type_sel)[0].checked){

	}else{
		$(".radio").each(function(){
			 if($(this)[0].checked){
				 $(this)[0].checked = false;
			 }
		})
		$('#'+type_sel)[0].checked = true;
	}
})

//
// $('input:radio[name=sex]:checked').val();
// $('input:radio[name=sex]:nth(0)').attr('checked',true);


Storage

</script>
</body>
</html>
